Skip to content

Conversation

@metsma
Copy link
Contributor

@metsma metsma commented Jan 2, 2026

Add ee, fi, lt, lv to allowed IDN parsing list

WE2-1173

Signed-off-by: Raul Metsma raul@metsma.ee

installTranslator(translator);
loadTranslations();

auto list = QUrl::idnWhitelist();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, removing the .com fromPunycode() hack is a big improvement! Should we move the IDN whitelist initialization to a separate function initializeIdnWhitelist() with a comment that clarifies why this is needed and how this works? Perhaps also link to https://doc.qt.io/qt-6/qurl.html#setIdnWhitelist and https://github.com/qt/qtbase/blob/dev/src/corelib/io/qurlidna.cpp#L281-L318 in the comment. Note that "fi", "lt", "lv" already exist in https://github.com/qt/qtbase/blob/dev/src/corelib/io/qurlidna.cpp#L281-L318.

Also, see the discussion at https://qt-project.atlassian.net/browse/QTBUG-95597.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the goal is to show same url as in browse.
Right now we are depending on Qt behavior and as you can see it is always not the same as in browser.
I think extension should send URL in format that is show in browser.

QStringLiteral("MIIEAzCCA2WgAwIBAgIQOWkBW"));
}

void WebEidTests::fromPunycode_decodesEeDomain()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep the test to verify that "https://xn--igusnunik-p7af.ee" is shown as "\u00F5igusn\u00F5unik.ee", use URL + QUrl::PrettyDecoded directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, extension should send correctly formated url

Add ee, fi, lt, lv to allowed IDN parsing list

WE2-1173

Signed-off-by: Raul Metsma <raul@metsma.ee>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants